<template>
    <u-avatar class="shadow" size="86" :src="avatar"></u-avatar>
</template>

<script>
import avatarPath from '@/static/avatar.png';
export default {
    name: 'avatar-image',
    data() {
        return {};
    },
    computed: {
        avatar() {
            var user = this.$store.state.user;
            if (user && user.avatarUrl) {
                return user.avatarUrl;
            } else {
                return avatarPath;
            }
        }
    }
};
</script>

<style lang="scss"></style>
